<%= form_for(@user,:url=>url,:html=>{:class=>"form-horizontal"}) do |f|%>

  <% if @user.errors.any? %>
    <div id="error_explanation">
      <h2><%= pluralize(@user.errors.count, "error") %> prohibited this user from being saved:</h2>
      <ul>
      <% @user.errors.full_messages.each do |message| %>
        <li><%= message %></li>
      <% end %>
      </ul>
    </div>
  <% end %>

<div class="form-group">
	<%= f.label "姓 名",:class=>"col-sm-2 control-label" %>
	<div class="col-sm-4">
	<%= f.text_field :name, autofocus: true,:class=>"form-control",:placeholder=>"Enter name"%>
	</div>
</div>

<div class="form-group">
	<%= f.label "邮 箱",:class=>"col-sm-2 control-label" %>
	<div class="col-sm-4">
	<%= f.email_field :email, autofocus: true,:class=>"form-control",:placeholder=>"Enter email"%>
	</div>
</div>
<div class="form-group">
	<%= f.label "密 码",:class=>"col-sm-2 control-label" %>
	<div class="col-sm-4">
	<%= f.password_field :password,:class=>"form-control",autocomplete: "off" %>
	</div>
</div>

<div class="form-group">
	<%= f.label "确认密码",:class=>"col-sm-2 control-label" %>
	<div class="col-sm-4">
	 <%= f.password_field :password_confirmation,:class=>"form-control", autocomplete: "off" %>
	</div>
</div>

<div class="form-group">
	<%= f.label "联系电话",:class=>"col-sm-2 control-label" %>
	<div class="col-sm-4">
	<%= f.text_field :phone, autofocus: true,:class=>"form-control",:placeholder=>"Enter phone"%>
	</div>
</div>

  <div class="form-group">
    <div class="col-sm-offset-2 col-sm-4">
      
        <label class="checkbox-inline"><%= f.check_box :enabled%>启用用户</label>
  
      	<label class="checkbox-inline"><%= f.check_box :is_sys_admin%>系统管理员</label>
     
    </div>
  </div>

<div class="form-group">
    <div class="col-sm-offset-2 col-sm-10">
      <button type="submit" class="btn btn-default btn-primary">提 交</button>
    </div>
</div>

<%end%>